package com.tyf.rocketMQ.controller;

import com.tyf.rocketMQ.producer.MQProducerService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RestController
@RequestMapping("/producer")
public class ProducerController {

    @Resource
    private MQProducerService mqProducerService;

    @RequestMapping("/sendMessage")
    public void sendMsg(String msgBody){
        mqProducerService.sendMsg(msgBody);
    }
}
